﻿using AiXiu.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiXiu.IDAL
{
    /// <summary>
    /// 数据访问层接口
    /// </summary>
    public interface IUersServer
    {
        /// <summary>
        /// 用户名查重
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns></returns>
        bool IsSomeUersName(string userName);
        /// <summary>
        /// 手机号 查重
        /// </summary>
        /// <param name="mobile">手机号</param>
        /// <returns></returns>
        bool IsSomeMobile(string mobile);
        bool AddUser(TBLogins tBLogins);
        /// <summary>
        /// 找到Id找信息
        /// </summary>
        /// <param name="Id">编号</param>
        /// <returns></returns>
        TBUsers FindByUserId(int  Id);
        /// <summary>
        /// 使用EntityState更新数据库
        /// </summary>
        /// <param name="profile"></param>
        /// <returns></returns>
        TBUsers EditWithoutAvatar(TBUsers profile);
        TBUsers EditAvatar(TBUsers profile);
    }
}
